﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using s2b.ControleDesenvolvimentoProjetos.Util.Auxiliar;

namespace s2b.ControleDesenvolvimentoProjetos
{
    public partial class WFVisualizaFuncionario : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void gdvFuncionario_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            switch (e.CommandName)
            {
                case "Delete":
                    Auxiliar.DeletarRegistro(e, gdvFuncionario, "ID_FUNC", "FUNCIONARIO");
                    break;
                case "Edit":
                    Response.Redirect(String.Format("WFFuncionario.aspx?ID_FUNC={0}", Auxiliar.RetornaIdRegistro(e, gdvFuncionario, "ID_FUNC")));
                    break;
                case "View":
                    Response.Redirect(String.Format("WFVisualizarTarefas.aspx?ID_FUNC={0}&ID_PROJETO=0&ID_CLIENTE=0&ID_TAREFA=0", Auxiliar.RetornaIdRegistro(e, gdvFuncionario, "ID_FUNC")));

                    break;
                default:
                    break;
            }
        }
    }
}